# this could be MKL on an Intel platform or ESSL on an IBM platform.
#
CC = icpc
LIBS = -L/opt/intel/Compiler/11.1/080/Frameworks/mkl/lib/em64t -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core 
CFLAGS = -O3
INCLUDES = -I/opt/intel/Compiler/11.1/080/Frameworks/mkl/include

all:	benchmark-naive benchmark-blocked benchmark-sa_jg benchmark-blas

benchmark-naive: benchmark.o dgemm-naive.o
	$(CC) -o $@ $(LIBS) benchmark.o dgemm-naive.o
benchmark-blocked: benchmark.o dgemm-blocked.o
	$(CC) -o $@ $(LIBS) benchmark.o dgemm-blocked.o
benchmark-blas: benchmark.o dgemm-blas.o
	$(CC) -o $@ $(LIBS) benchmark.o dgemm-blas.o
benchmark-sa_jg: benchmark.o dgemm-sa_jg.o
	$(CC) -o $@ $(LIBS) benchmark.o dgemm-sa_jg.o

%.o: %.cpp
	$(CC) -c $(CFLAGS) $<

%.o: %.c
	$(CC) -c $(CFLAGS) $<

clean:
	rm -f benchmark-naive benchmark-blocked benchmark-sa_jg benchmark-blas *.o
